﻿
@{
    ViewBag.Title = "NewTypeAdd";
    Layout = "~/Areas/AdminInfo/Views/Shared/_LayoutPage1.cshtml";
}
@model Gtkj.CMS.Model.NewType
<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <section class="panel panel-padding">

                <form id="form1" class="layui-form layui-form-pane" data-render="true" action="/AdminInfo/AdminSystem/NewTypeAddInfo">
                    <div class="layui-form-item">
                        <label class="layui-form-label">分类名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="Name" value="@(Model==null?"": Model.TypeName)" required jq-verify="required" jq-error="请输入分类名称" placeholder="请输入分类名称" autocomplete="off" class="layui-input ">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" jq-submit lay-filter="s">立即提交</button>
                            @if (Model == null)
                            {
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            }
                        </div>
                    </div>
                    <input type="hidden" name="ID" value="@(Model==null?"":Model.ID.ToString())" />
                </form>
            </section>
        </div>
    </div>
</div>
<script>

    layui.use(['jqform'], function () {
        var $ = layui.jquery,
            form = layui.jqform;
        form.completed = function (ret, options, that) {
            if (ret.status == 200) {
                parent.closeall();

            } else {
                layer.msg(ret.message);
            }
        }

    });
</script>